# range语句，快速生成序列----------------------------------------

# range(num)    生成0 ～ num-1的数字序列
# for i in range(10):
#     print(str(i) + " ", end='')
# print()
#
# # range(num1, num2) 生成num1 ～ num2-1
# for i in range(10, 20):
#     print(str(i) + " ", end='')
# print()
#
# # range(num1, num2, step) 生成num1, num1+step, num1+step*2
# for i in range(20, 30, 2):
#     print(str(i) + " ", end='')
# print()

# for循环打印输出九九乘法表-------------------------------------
# for i in range(1,10):
#     for j in range(1,i+1):
#         print(f"{i} * {j} = {i*j}\t", end='')
#     print()

# continue和break语句----------------------------------------
# for i in range(1, 11):
#     print(f"语句{i}:")
#     if i % 2 == 0:
#         continue
#     print("不是偶数，语句2也执行")
#     if i == 7:
#         print("执行到7，提前结束")
#         break

# 综合案例
import random
money = 10000
for i in range(1, 21):
    score = random.randint(1, 10)
    if score < 5:
        print(f"第{i}位员工的绩效为{score},绩效不足，没有奖金")
        continue
    else:
        if money >= 1000:
            money -= 1000
            print(f"第{i}位员工的绩效为{score},发放奖金1000元")
        else:
            print("奖金发完了，不发了")
            break